﻿
    using Chain.BLL;
    using System;
    using System.Data;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class historyexchangepoint : Page
    {

        private PointLog PointLogModel = new PointLog();


        protected string GetTypeStr(object objPointChangeType)
        {
            switch (Convert.ToInt32(objPointChangeType))
            {
                case 1:
                    return "商品消费";

                case 2:
                    return "快速消费";

                case 3:
                    return "会员充次";

                case 4:
                    return "礼品兑换";

                case 5:
                    return "会员登记";

                case 6:
                    return "手动修改";

                case 7:
                    return "推荐会员注册";

                case 9:
                    return "被推荐人";

                case 10:
                    return "计时消费";

                case 11:
                    return "会员导入";

                case 12:
                    return "消费撤单";

                case 13:
                    return "消费退货";

                case 14:
                    return "会员充时";

                case 15:
                    return "会员充值";

                case 0x10:
                    return "会员签到";
                case 21:
                    return "分享奖励 ";
            }
            return "";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+"))
            {
                int MemID = Convert.ToInt32(base.Request.Cookies["uid"].Value);
                DataTable dt = this.PointLogModel.GetList("PointMemID=" + MemID + " order by PointID desc").Tables[0];
                this.rptHistoryexchangepoint.DataSource = dt;
                this.rptHistoryexchangepoint.DataBind();
                if (dt.Rows.Count == 0)
                {
                    this.msg.Style.Add("display", "");
                }
            }
        }
    }


